import { createApp } from "vue";
import { store } from "./store";
// element-plus
import ElementPlus from "element-plus";
// 引入element-plus 全部图标
import * as ElementIcons from "@element-plus/icons-vue";
// 国际化
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import "element-plus/dist/index.css";
// normalize.css
import "normalize.css/normalize.css";
// 全局样式
import "./styles/index.less";
// tailwindcss
import "./styles/tailwind.css";
// svg icon
import "virtual:svg-icons-register";
import { initializeDarkMode } from "@/utils/dark-mode";
import App from "./App.vue";
import router from "./router";

initializeDarkMode();

const app = createApp(App);
for (const [key, component] of Object.entries(ElementIcons)) {
  app.component(key, component);
}
app.use(ElementPlus, {
  locale: zhCn, // 将中文设置为默认语言
  zIndex: 3000,
  size: "default"
});
app.use(store);
app.use(router);

app.mount("#app");
